package com.example.finalsystem.Dao;


import com.example.finalsystem.Entity.OutList;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OutListMapper {


    @Select("select outlistid as outListId ," +
            " FK_listgoodsid as fkListgoodsid, " +
            " exportNumber as exportnumber ," +
            " FK_buylistid as fkBuylistid ," +
            " logisticsInformation as logisticsinformation ," +
            " state as state from uml_out_list where FK_listgoodsid = ${listGoodsId}")
    List<OutList> getAllByListGoodsId(Long listGoodsId);

    @Select("select outlistid as outListId ," +
            " FK_listgoodsid as fkListgoodsid, " +
            " exportNumber as exportnumber ," +
            " FK_buylistid as fkBuylistid ," +
            " logisticsInformation as logisticsinformation ," +
            " state as state  from uml_out_list where FK_buylistid = ${buyListId}")
//    @Select("select * from uml_out_list where FK_buylistid = #{buyListId}")
    List<OutList> getAllByBuyListId(Long buyListId);


    @Select("select outlistid as outListId ," +
            " FK_listgoodsid as fkListgoodsid, " +
            " exportNumber as exportnumber ," +
            " FK_buylistid as fkBuylistid ," +
            " logisticsInformation as logisticsinformation ," +
            " state as state  from uml_out_list")
    List<OutList> getAll();


    int deleteByPrimaryKey(String outlistid);

    int insert(OutList record);

    int insertSelective(OutList record);

    OutList selectByPrimaryKey(String outlistid);

    int updateByPrimaryKeySelective(OutList record);

    int updateByPrimaryKeyWithBLOBs(OutList record);

    int updateByPrimaryKey(OutList record);
}